import request from '@/utils/request.ts'
import type { loginForm, loginResponseData, userResponseData } from '@/api/user/type.ts'

enum API {
    LOGIN_URL = '/users/login',
    USER_INFO_URL = '/users/info'
}

export const reqLogin = ( data: loginForm ) => request.post<loginResponseData>(API.LOGIN_URL, data)

export const reqUserInfo = () => request.get<userResponseData>(API.USER_INFO_URL)